/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Short Integer Collection Class
 *      Provides a custom collection implementation for storing 
 * System.Int32 instances.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
using System;
using System.Collections;
using System.Collections.Generic;
using Adaptive.Foundation;

namespace Adaptive.Foundation.Collections
{
    /// <summary>
    /// Provides a custom collection implementation for storing 
    /// <see cref="System.Int16"/> instances.
    /// </summary>
    public class ShortCollection : GenericCollectionBase<short>
    {
        /*--------------------------------------------------------------------------------
         * Constructor / Dispose / Destructor Methods
         *------------------------------------------------------------------------------*/
        #region Constructor / Dispose / Destructor Methods
        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        /// <value>
        /// This is the default constructor.
        /// </value>
        public ShortCollection()
            : base()
        {
        }
        #endregion

        /*--------------------------------------------------------------------------------
         * Protected Methods / Functions
         *------------------------------------------------------------------------------*/
        #region Public Methods / Functions
        /// <summary>
        /// Gets the unique key for the specified object instance used to idemn
        /// </summary>
        /// <param name="itemToGetKeyFor">The integer being appended to the collection.</param>
        /// <returns>
        /// A string value used to identify the object instance.
        /// </returns>
        protected override string GetKeyForObject(short itemToGetKeyFor)
        {
            return Count.ToString();
        }
        #endregion
    }
}
